package com.example.project.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import cn.hutool.core.annotation.Alias;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.example.project.common.LDTConfig;
import java.util.List;
import com.example.project.entity.User;
import lombok.Getter;
import lombok.Setter;

/**
* <p>
* 护工评价
* </p>
*
* @author
*/
@Getter
@Setter
@ApiModel(value = "Comments对象", description = "护工评价")
public class Comments implements Serializable {

private static final long serialVersionUID = 1L;

    // 编号
    @ApiModelProperty("编号")
    @Alias("编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;


    // 评价的护工
    @ApiModelProperty("评价的护工")
    @Alias("评价的护工")
    private Integer workerId;


    // 评价内容
    @ApiModelProperty("评价内容")
    @Alias("评价内容")
    private String content;


    // 评价人
    @ApiModelProperty("评价人")
    @Alias("评价人")
    private Integer userId;


    // 评价时间
    @ApiModelProperty("评价时间")
    @Alias("评价时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;


    // 修改时间
    @ApiModelProperty("修改时间")
    @Alias("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;



    @TableField(exist = false)
    //子回复列表
    private List<Comments> children;

    @TableField(exist = false)
    //当前评论用户
    private User user;

    // 回复的用户
    @TableField(exist = false)
    private User pUser;
}